import { Link, useNavigate } from "react-router-dom"
const Login = () => {
    const navigate = useNavigate()
    return (
        <div>
            我是登录页<br />
            {/*声明式写法 */}
            <Link to="/article?id=112&name=abc">跳转到文章页</Link><br />
            {/*命令式写法 */}
            <button onClick={() => { navigate('/article') }}>跳转到文章页</button>
            <button onClick={() => { navigate('/article/678/java') }}>params传参</button>
        </div>
    )
}

export default Login